package com.HomeWorkhsp.chapter10.homework.homework03;

/**
 * Enjoy programming!!!
 * Time: 2021/12/10 -  15:14
 */
abstract class Animal {
    abstract void shout();
}
class Cat extends Animal{
    public void shout(){
        System.out.println("猫会喵喵叫");
    }
}
class Dog extends Animal{
    public void shout(){
        System.out.println("狗会汪汪叫");
    }
}
class Test{
    public static void main(String[] args) {
        Cat cat = new Cat();
        Dog dog = new Dog();

        cat.shout();
        dog.shout();
    }
}
